package com.demo.project_template.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 商品表
 * </p>
 *
 * @author 杨玉龙
 * @since 2023-06-19 15:56:43
 */
@Getter
@Setter
@TableName("t_product")
@ApiModel(value = "Product对象", description = "商品表")
public class Product implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("product id")
      @TableId(value = "product_id", type = IdType.AUTO)
    private Integer productId;

    @ApiModelProperty("商品名称")
    @TableField("product_name")
    private String productName;

    @ApiModelProperty("商品分类Id")
    @TableField("product_category_id")
    private Integer productCategoryId;

    @ApiModelProperty("商品图片")
    @TableField("product_img")
    private String productImg;

    @ApiModelProperty("商品详情图")
    @TableField("product_details_picture")
    private String productDetailsPicture;

    @ApiModelProperty("商品销量")
    @TableField("sales_total")
    private Integer salesTotal;

    @ApiModelProperty("规格列表（product_specs表list JSON）")
    @TableField("product_attribute_list")
    private String productAttributeList;

    @ApiModelProperty("是否删除(0=否，1=是)")
    @TableField("is_delete")
    @TableLogic
    private String isDelete;

    @ApiModelProperty("添加时间")
      @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty("最后修改时间")
      @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


}
